# AfD-specific findings
stayer_infladj_ames <- rio::import("est/stayer_analyses_infladj_marginal_effects_main.csv")
stayer_infladj_desc <- rio::import("est/stayer_analyses_infladj_descriptives_main.csv")
stayer_infladj_info <-
  rio::import("est/stayer_analyses_infladj_model_info_main.csv") %>%
  dplyr::mutate(spec = dplyr::case_when(
    is.na(spec) ~ "All",
    spec == "ltr_since_3 == 0" ~ "Moved last 3", 
    spec == "ltr_since_5 == 0" ~ "Moved last 5", 
    spec == "ltr_since_3 == 1" ~ "Since 3", 
    spec == "ltr_since_5 == 1" ~ "Since 5"
  ))


## Long-term resident analyses

### Within-effects

#### AfD Support (Party ID) by Homeownership and Income

##### Five years, regular controls 
ggvote_plot_mfx2(
  ames_data = stayer_infladj_ames,
  desc_data = stayer_infladj_desc,
  model_ids = c(209, 224),
  add_descriptives = TRUE,
  d = "cmr_arm_cwu",
  x1  = "Homeownership",
  x2 = "log_hinc_eq",
  x2_continuous = TRUE,
  ytitle = "Marginal Effect",
  xtitle = "Log. Equivalized Household Income",
  font_size = 15L
) %>%
  ggsave(
    plot = .,
    filename = paste0("infladj-afd-sup-own-inc-5", "-1.pdf"),
    path = "fig",
    width = 8,
    height = 4,
    dpi = 300,
    limitsize = FALSE
  )
